/*
 * @Author: 赛罗
 * @Date: 2023-10-26 16:43:44
 * @LastEditors: 赛罗
 * @LastEditTime: 2024-05-15 18:10:52
 * @FilePath: \haixiaoke-enterprise-web-v5\src\api\house\condition.js
 * @Description:
 */
import request from "@/utils/request";

// 房态状态统计列表查询
export function getHouseStatusStatistics(query) {
  return request({
    url: "/enterprise/house/houseDynamic/houseStatusStatistics",
    method: "get",
    params: query,
  });
}

// 房态条件筛选房屋信息
export function queryFindHouseInfoList(data) {
  return request({
    url: "/enterprise/house/houseDynamic/findHouseInfoList",
    method: "post",
    data: data,
  });
}

// 房态条件筛选房屋信息 列表
export function listFindHouse(data) {
  return request({
    url: "/enterprise/house/houseDynamic/findHouseList",
    method: "POST",
    data: data,
  });
}

// 房态列表
export function conditionList(query) {
  return request({
    url: "/enterprise/house/houseDynamic/conditionList",
    method: "get",
    params: query,
  });
}

// 房态详情
export function houseDynamic(orderId) {
  return request({
    url: "/enterprise/order/order/houseDynamic/" + orderId,
    method: "get",
  });
}
// 入住
export function checkIn(data) {
  return request({
    url: "/enterprise/order/order/checkIn",
    method: "post",
    data: data,
  });
}

// 取消预定
export function cancelReservation(data) {
  return request({
    url: "/enterprise/order/order/cancelReservation",
    method: "post",
    data: data,
  });
}

// 换房
export function exchangeHouse(data) {
  return request({
    url: "/enterprise/order/order/apartment/exchangeHouse",
    method: "post",
    data: data,
  });
}

// 续租
export function relet(data) {
  return request({
    url: "/enterprise/order/order/apartment/relet",
    method: "post",
    data: data,
  });
}

// 获取退订订单审核记录详细信息
export function getcancelReservation(orderId) {
  return request({
    url: "/enterprise/order/auditRecord/cancelReservation/" + orderId,
    method: "get",
  });
}
// 退房
export function checkingOut(data) {
  return request({
    url: "/enterprise/order/order/apartment/checkingOut",
    method: "post",
    data: data,
  });
}

// 查看退房中退房金额详细信息
export function getcheckingOut(orderId) {
  return request({
    url: "/enterprise/order/order/apartment/checkingOut/" + orderId,
    method: "get",
  });
}

// 校验公寓订单是否验房
export function isCheckHouse(orderId) {
  return request({
    url:
      "/enterprise/order/houseInspection/apartment/check/orderInspection/" +
      orderId,
    method: "get",
  });
}

// 查询订单每日房费详情列表
export function expensesList(query) {
  return request({
    url: "/enterprise/order/expenses/list",
    method: "get",
    params: query,
  });
}

// 公寓订单验房
export function orderInspection(data) {
  return request({
    url: "/enterprise/order/houseInspection/apartment/orderInspection",
    method: "post",
    data: data,
  });
}

// 退费处理
export function completed(data) {
  return request({
    url: "/enterprise/order/order/apartment/completed",
    method: "post",
    data: data,
  });
}
// 查询房屋成员
export function memberList(query) {
  return request({
    url: "/enterprise/house/member/list",
    method: "get",
    params: query,
  });
}

// 新增同住人
export function memberAdd(data) {
  return request({
    url: "/enterprise/house/member",
    method: "post",
    data: data,
  });
}

// 编辑同住人
export function memberPut(data) {
  return request({
    url: "/enterprise/house/member",
    method: "put",
    data: data,
  });
}

// 编辑同住人
export function memberDel(memberId) {
  return request({
    url: "/enterprise/house/member/" + memberId,
    method: "delete",
  });
}

// 获取验房记录设备损坏信息（路径后面验房id）
export function getDamagedFacilities(ids) {
  return request({
    url: "/enterprise/house/inspection/process/" + ids,
    method: "get",
  });
}


// 房态查询-卡片查询
export function conditionCard(query) {
  return request({
    url: "/enterprise/house/houseDynamic/conditionCard",
    method: "get",
    params: query,
  });
}
